* lisp/isearch.el (isearch-edit-string): Let-bind `history-add-new-input'
authorJuri Linkov <juri@jurta.org>
Sat, 19 Nov 2011 19:59:37 +0000 (21:59 +0200)
committerJuri Linkov <juri@jurta.org>
Sat, 19 Nov 2011 19:59:37 +0000 (21:59 +0200)
to nil instead of binding `search-ring' and `regexp-search-ring'.

lisp/ChangeLog
lisp/isearch.el

index 713b47ad31d700a3f425c38d6a0dee785ddb9936..63a74565807c9b6d13f927492154f6b6939c6f1e 100644 (file)
@@ -1,3 +1,9 @@
+2011-11-19  Juri Linkov  <juri@jurta.org>
+
+       * isearch.el (isearch-edit-string): Let-bind `history-add-new-input'
+       to nil instead of binding `search-ring' and `regexp-search-ring'.
+       (Bug#9185)
+
 2011-11-19  Eli Zaretskii  <eliz@gnu.org>
 
        * simple.el (line-move): Force movement by logical lines for any
index 977de6ac4b013213598a91566aa5bd0aefba75a3..07ae56934b5c5572bba1bd1db8e38a78c5b43e13 100644 (file)
@@ -1162,11 +1162,10 @@ The following additional command keys are active while editing.
 
          (unwind-protect
              (let* ((message-log-max nil)
-                    ;; Protect global value of search rings from updating
-                    ;; by `read-from-minibuffer'.  It should be updated only
-                    ;; by `isearch-update-ring' in `isearch-done', not here.
-                    (search-ring search-ring)
-                    (regexp-search-ring regexp-search-ring)
+                    ;; Don't add a new search string to the search ring here
+                    ;; in `read-from-minibuffer'. It should be added only
+                    ;; by `isearch-update-ring' called from `isearch-done'.
+                    (history-add-new-input nil)
                     ;; Binding minibuffer-history-symbol to nil is a work-around
                     ;; for some incompatibility with gmhist.
                     (minibuffer-history-symbol))